/**
 * @file sos.h
 *
 */
#ifndef SOS_H
#define SOS_H

#ifdef __cplusplus
extern "C" {
#endif

/*********************
 *      INCLUDES
 *********************/

#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lvgl.h"
#include "lv_watch_conf.h"
#else
#include "../../../lvgl/lvgl.h"
#include "../../../../product/crane_bare/config/watch/lv_watch_conf.h"
#endif

#if USE_LV_WATCH_SOS != 0

/*********************
 *      DEFINES
 *********************/

/**********************
 *      TYPEDEFS
 **********************/
enum
{
    SOS_OFF = 0,
    SOS_GIF_ON,
    SOS_DIALING_ON,
};

typedef uint8_t sos_status_t;

enum
{
    SOS_PHONE_DIAL_FAIL = 0,
    SOS_PHONE_DIAL_SUCCESS,
};

typedef uint8_t sos_phone_status_t;

typedef struct {
    uint8_t phone_id;
    sos_status_t status;
} sos_t;

typedef struct
{
    lv_watch_activity_ext_t oldext;
    gif_info_t * gif_info;
    lv_task_t * gif_task_p;
} lv_sos_ext_t;

/**********************
 * GLOBAL PROTOTYPES
 **********************/
lv_res_t sos_btn_action(lv_obj_t * btn);
void sos_destory(void);
sos_status_t get_sos_status(void);
void sos_phone_dailing_status_ind(sos_phone_status_t status);
lv_obj_t * sos_create(lv_obj_t * activity_obj);

/**********************
 *      MACROS
 **********************/

#endif /*USE_LV_WATCH_SOS*/

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /*SOS_H*/
